|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.source.Annotation
Annotation managed by an IAnnotationModel
.
Annotations are considered being located at layers and are considered being painted
starting with layer 0 upwards. Thus an annotation of layer 5 will be drawn on top of
all co-located annotations at the layers 4 - 0. Subclasses must provide the annotations
paint method.
IVerticalRuler
Field Summary | |
static String |
TYPE_UNKNOWN
|
Constructor Summary | |
protected |
Annotation()
Creates a new annotation that is not persistent and type less. |
|
Annotation(boolean isPersistent)
Creates a new annotation. |
|
Annotation(String type,
boolean isPersistent,
String text)
Creates a new annotation with the given properties. |
Method Summary | |
protected static void |
drawImage(Image image,
GC gc,
Canvas canvas,
Rectangle r,
int align)
Convenience method for drawing an image aligned inside a rectangle. |
protected static void |
drawImage(Image image,
GC gc,
Canvas canvas,
Rectangle r,
int halign,
int valign)
Convenience method for drawing an image aligned inside a rectangle. |
int |
getLayer()
Deprecated. use IAnnotationAccessExtension.getLayer(Annotation) |
String |
getText()
Returns the text associated with this annotation. |
String |
getType()
Returns the type of the annotation. |
boolean |
isMarkedDeleted()
Returns whether this annotation is marked as deleted. |
boolean |
isPersistent()
Returns whether this annotation is persistent. |
void |
markDeleted(boolean deleted)
Marks this annotation deleted according to the value of the deleted parameter. |
void |
paint(GC gc,
Canvas canvas,
Rectangle bounds)
Deprecated. use IAnnotationAccessExtension.paint(Annotation, GC, Canvas, Rectangle) |
protected void |
setLayer(int layer)
Deprecated. since 3.0 |
void |
setText(String text)
Sets the text associated with this annotation. |
void |
setType(String type)
Sets the type of this annotation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String TYPE_UNKNOWN
Constructor Detail |
protected Annotation()
public Annotation(String type, boolean isPersistent, String text)
type
- the type of this annotationisPersistent
- true
if this annotation is
persistent, false
otherwisetext
- the text associated with this annotationpublic Annotation(boolean isPersistent)
isPersistent
- true
if persistent, false
otherwiseMethod Detail |
protected static void drawImage(Image image, GC gc, Canvas canvas, Rectangle r, int halign, int valign)
image
- the image to be drawncanvas
- the canvas on which to drawr
- the clipping rectanglehalign
- the horizontal alignment of the image to be drawnvalign
- the vertical alignment of the image to be drawnprotected static void drawImage(Image image, GC gc, Canvas canvas, Rectangle r, int align)
image
- the image to be drawncanvas
- the canvas on which to drawr
- the clipping rectanglealign
- the alignment of the image to be drawnpublic boolean isPersistent()
true
if this annotation is persistent, false
otherwisepublic void setType(String type)
type
- the annotation typepublic String getType()
public void markDeleted(boolean deleted)
deleted
parameter.
deleted
- true
if annotation should be marked as deletedpublic boolean isMarkedDeleted()
true
if annotation is marked as deleted, false
otherwisepublic void setText(String text)
text
- the text associated with this annotationpublic String getText()
null
protected void setLayer(int layer)
layer
- the layer of this annotationpublic int getLayer()
IAnnotationAccessExtension.getLayer(Annotation)
public void paint(GC gc, Canvas canvas, Rectangle bounds)
IAnnotationAccessExtension.paint(Annotation, GC, Canvas, Rectangle)
canvas
- the canvas to draw onbounds
- the bounds inside the canvas to draw on
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |